﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace MyChart
{
    public class PeiXianDz : ChartBase
    {
        int m_dzId;

        int m_nameRow;

        public int NameRow
        {
            get { return m_nameRow; }
            set { m_nameRow = value; }
        }
        int m_nameCol;

        public int NameCol
        {
            get { return m_nameCol; }
            set { m_nameCol = value; }
        }

        public int DzId
        {
            get { return m_dzId; }
            set { m_dzId = value; }
        }
        int m_rowCount;

        public int RowCount
        {
            get { return m_rowCount; }
            set { m_rowCount = value; }
        }
        string[] m_dzUsers;

        public string[] DzUsers
        {
            get { return m_dzUsers; }
            set { m_dzUsers = value; }
        }
        FxpDzBoard m_parent;

        public FxpDzBoard Parent
        {
            get { return m_parent; }
            set { m_parent = value; }
        }
        public PeiXianDz()
        {
            DzUsers = new string[3];
        }
        public PeiXianDz(int id)
        {
            m_dzId = id;
            DzUsers = new string[3];
        }

        public PeiXianDz(int id, int r, int c)
        {
            m_dzId = id;
            DzUsers = new string[3];
            m_nameRow = r;
            m_nameCol = c;
        }

        public override void InitChart(DataTable dt)
        {
            string str;
            str = dt.Rows[m_nameRow][m_nameCol].ToString();
            DzUsers[0] = str;
            str = dt.Rows[m_nameRow + 1][m_nameCol].ToString();
            DzUsers[1] = str;
        }
    }
}
